
const { ccclass, property } = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    @property(cc.Node)
    WuKong: cc.Node = null;

    currentGongJiConut: number = 0;
    //悟空受到攻击
    onWuKongShouShangHai() {
        this.currentGongJiConut++;
        if (this.currentGongJiConut == 3) {
            let anim = this.WuKong.getComponent(cc.Animation);
            anim.play("houzitang");
        } else {
            let anim = this.WuKong.getComponent(cc.Animation);
            anim.play("wukonglose");
        }

    }
}
